<template>
  <div>
    <div class="banner" @click="handleBannerCilck">
      <img class="bannerimg" :src="bannerImg" alt="">
      <div class="desc">
        <div>{{sightName}}</div>
        <div>
          <span class="iconfont">&#xe64a;</span>
          2
        </div>
      </div>
    </div>
    <gallary :imgs="gallaryImgs" v-show="showgallary"  @colsegallary="handleBannerCilck"></gallary>
  </div>
</template>

<script>
import Gallary from '../../../common/gallary/Gallary'
export default {
  name: 'detailbanner',
  props: {
    sightName: String,
    bannerImg: String,
    gallaryImgs: Array
  },
  data () {
    return {
      showgallary: false
    }
  },
  methods: {
    handleBannerCilck () {
      this.showgallary = !this.showgallary
    }

  },
  components: {
    Gallary
  }
}
</script>

<style scoped>
  .banner{
    width: 100%;
    position: relative;
  }
  .bannerimg{
    width: 100%;
  }
  .desc{
    width: 100%;
    line-height: 24px;
    position: absolute;
    bottom:0;
    left: 0;
    display: flex;
    color: #ffffff;
    justify-content: space-between;
    padding: 2px 10px;
    background-image: linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,0.8));
  }
</style>
